package com.sina.weibo.view;

import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.text.Spannable;
import android.text.TextPaint;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.TextView.BufferType;
import com.sina.weibo.ImageViewerDialog;
import com.sina.weibo.RPCHelper;
import com.sina.weibo.RPCHelper.HttpException;
import com.sina.weibo.StaticInfo;
import com.sina.weibo.Utils;
import com.sina.weibo.models.MBlog;
import com.sina.weibo.models.User;
import java.io.File;
import java.util.Date;
import java.util.Hashtable;
import java.util.Map;

public class MBlogListItemView extends LinearLayout
  implements MainListItemView, View.OnClickListener
{
  private static Map<String, ListView> downloading = new Hashtable();
  private static Bitmap portrait;
  private static Bitmap vPortrait;
  private Context context;
  private File downloadedImage;
  private boolean finishPicLoad;
  private ImageView imComment;
  private ImageView imRedirect;
  boolean isOwner = false;
  private boolean isRedirectBlog;
  public boolean loadPictureRunning;
  public MBlog mBlog;
  private String mCacheDir;
  private TextView mContent;
  private MBlog mCurrentBlog;
  private TextView mDate;
  private String mFileDir;
  private ImageView mIconPic;
  private ImageView mIconV;
  private TextView mName;
  public ImageView mPortrait;
  private int mReadMode;
  private TextView mSubContent;
  private LinearLayout mSubLayout;
  private ImageView mUploadPic1;
  private ImageView mUploadPic2;
  private LoadPictureTask mldPicTsk;
  public Bitmap newPortrait;
  private ListView parent;
  String picfilePath;
  private TextView tvComment;
  private TextView tvForm;
  private TextView tvRedirect;

  public MBlogListItemView(Context paramContext, ListView paramListView, MBlog paramMBlog, boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3, boolean paramBoolean4, int paramInt)
  {
    super(paramContext);
    this.context = paramContext;
    this.parent = paramListView;
    this.mBlog = paramMBlog;
    String str1 = paramContext.getCacheDir().getAbsolutePath();
    this.mCacheDir = str1;
    String str2 = paramContext.getFilesDir().getAbsolutePath();
    this.mFileDir = str2;
    View localView = ((LayoutInflater)paramContext.getSystemService("layout_inflater")).inflate(2130903057, this);
    TextView localTextView1 = (TextView)findViewById(2131623996);
    this.mName = localTextView1;
    TextView localTextView2 = (TextView)findViewById(2131624022);
    this.mDate = localTextView2;
    TextView localTextView3 = (TextView)findViewById(2131623998);
    this.mContent = localTextView3;
    TextView localTextView4 = (TextView)findViewById(2131624026);
    this.mSubContent = localTextView4;
    ImageView localImageView1 = (ImageView)findViewById(2131624021);
    this.mIconV = localImageView1;
    ImageView localImageView2 = (ImageView)findViewById(2131624023);
    this.mIconPic = localImageView2;
    ImageView localImageView3 = (ImageView)findViewById(2131624024);
    this.mUploadPic1 = localImageView3;
    ImageView localImageView4 = (ImageView)findViewById(2131623982);
    this.mUploadPic2 = localImageView4;
    TextView localTextView5 = (TextView)findViewById(2131624027);
    this.tvForm = localTextView5;
    TextView localTextView6 = (TextView)findViewById(2131623989);
    this.tvComment = localTextView6;
    this.tvComment.setOnClickListener(this);
    TextView localTextView7 = (TextView)findViewById(2131623988);
    this.tvRedirect = localTextView7;
    this.tvRedirect.setOnClickListener(this);
    ImageView localImageView5 = (ImageView)findViewById(2131624029);
    this.imComment = localImageView5;
    this.imComment.setOnClickListener(this);
    ImageView localImageView6 = (ImageView)findViewById(2131624028);
    this.imRedirect = localImageView6;
    this.imRedirect.setOnClickListener(this);
    ImageView localImageView7 = (ImageView)findViewById(2131623993);
    this.mPortrait = localImageView7;
    LinearLayout localLinearLayout = (LinearLayout)findViewById(2131624025);
    this.mSubLayout = localLinearLayout;
    this.mReadMode = paramInt;
    MBlogListItemView localMBlogListItemView = this;
    MBlog localMBlog = paramMBlog;
    boolean bool1 = paramBoolean1;
    boolean bool2 = paramBoolean2;
    boolean bool3 = paramBoolean4;
    int i = paramInt;
    localMBlogListItemView.update(localMBlog, bool1, bool2, bool3, i);
    this.mUploadPic1.setOnClickListener(this);
    this.mUploadPic2.setOnClickListener(this);
  }

  private void displayDefaultPortrait()
  {
    ImageView localImageView = this.mPortrait;
    Bitmap localBitmap = getDefaultPortrait();
    localImageView.setImageBitmap(localBitmap);
  }

  private Bitmap getDefaultPortrait()
  {
    if ((portrait == null) || (portrait.isRecycled()))
    {
      Context localContext = this.context;
      Bitmap localBitmap = Utils.outputRoundRectBitmap(BitmapFactory.decodeResource(this.context.getResources(), 2130838011));
      portrait = Utils.outputBmp(localContext, localBitmap, 0);
    }
    return portrait;
  }

  private Bitmap getPreviewPic(Bitmap paramBitmap)
  {
    int i = paramBitmap.getWidth();
    int j = paramBitmap.getHeight();
    int k = this.context.getResources().getInteger(2131361794);
    float f1 = k;
    if (i <= j);
    for (int m = i; ; m = j)
    {
      float f2 = m;
      float f3 = f1 / f2;
      Matrix localMatrix = new Matrix();
      boolean bool = localMatrix.postScale(f3, f3);
      Bitmap localBitmap = paramBitmap;
      int n = 0;
      return Bitmap.createBitmap(Bitmap.createBitmap(localBitmap, 0, n, i, j, localMatrix, 1), 0, 0, k, k);
    }
  }

  private void viewBigsizeBmp()
  {
    if ((this.mBlog != null) && (this.mBlog.pic != null))
    {
      Context localContext = this.context;
      String str = this.mBlog.pic;
      ImageViewerDialog localImageViewerDialog = new ImageViewerDialog(localContext, str);
      localImageViewerDialog.setCanceledOnTouchOutside(1);
      localImageViewerDialog.show();
    }
  }

  public void onClick(View paramView)
  {
    TextView localTextView1 = this.tvComment;
    if (paramView != localTextView1)
    {
      ImageView localImageView1 = this.imComment;
      if (paramView != localImageView1);
    }
    else
    {
      Context localContext1 = this.context;
      Context localContext2 = this.context;
      String str1 = this.mBlog.mblogid;
      String str2 = this.mBlog.uid;
      Intent localIntent1 = Utils.simpleComment(localContext2, str1, str2);
      localContext1.startActivity(localIntent1);
    }
    while (true)
    {
      return;
      TextView localTextView2 = this.tvRedirect;
      if (paramView != localTextView2)
      {
        ImageView localImageView2 = this.imRedirect;
        if (paramView != localImageView2);
      }
      else
      {
        Context localContext3 = this.context;
        Context localContext4 = this.context;
        MBlog localMBlog = this.mBlog;
        Intent localIntent2 = Utils.forwardMBlog(localContext4, localMBlog);
        localContext3.startActivity(localIntent2);
        continue;
      }
      ImageView localImageView3 = this.mUploadPic1;
      if (paramView != localImageView3)
      {
        ImageView localImageView4 = this.mUploadPic2;
        if (paramView != localImageView4)
          continue;
      }
      viewBigsizeBmp();
    }
  }

  public void update(Object paramObject, boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3, int paramInt)
  {
    displayDefaultPortrait();
    MBlog localMBlog1 = (MBlog)paramObject;
    this.mBlog = localMBlog1;
    if (StaticInfo.mUser != null)
    {
      String str1 = this.mBlog.uid;
      String str2 = StaticInfo.mUser.uid;
      boolean bool = str1.equals(str2);
      this.isOwner = bool;
    }
    label174: label335: String str9;
    if (paramBoolean3)
    {
      TextView localTextView1 = this.mDate;
      int i = getResources().getColor(2131230720);
      localTextView1.setTextColor(i);
      TextView localTextView2 = this.mName;
      String str3 = this.mBlog.nick;
      localTextView2.setText(str3);
      this.mName.getPaint().setFakeBoldText(1);
      TextView localTextView3 = this.mDate;
      Context localContext1 = this.context;
      Date localDate = this.mBlog.time;
      String str4 = Utils.formatDate(localContext1, localDate);
      localTextView3.setText(str4);
      if (this.mBlog.pic == null)
        break label547;
      this.mIconPic.setVisibility(0);
      this.mContent.setVisibility(0);
      this.mSubContent.setVisibility(0);
      if (this.mBlog.rtreason == null)
        break label559;
      TextView localTextView4 = this.mContent;
      String str5 = this.mBlog.rtreason;
      TextView.BufferType localBufferType1 = TextView.BufferType.SPANNABLE;
      localTextView4.setText(str5, localBufferType1);
      TextView localTextView5 = this.mSubContent;
      Object[] arrayOfObject1 = new Object[3];
      String str6 = this.mBlog.rtrootnick;
      arrayOfObject1[0] = str6;
      arrayOfObject1[1] = ": ";
      String str7 = this.mBlog.content;
      arrayOfObject1[2] = str7;
      String str8 = String.format("@%s%s %s", arrayOfObject1);
      TextView.BufferType localBufferType2 = TextView.BufferType.SPANNABLE;
      localTextView5.setText(str8, localBufferType2);
      Context localContext2 = getContext();
      Spannable localSpannable1 = (Spannable)this.mSubContent.getText();
      Utils.highlightContent(localContext2, localSpannable1);
      this.mSubLayout.setVisibility(0);
      Context localContext3 = getContext();
      Spannable localSpannable2 = (Spannable)this.mContent.getText();
      Utils.highlightContent(localContext3, localSpannable2);
      TextView localTextView6 = this.tvForm;
      if (!TextUtils.isEmpty(this.mBlog.src))
        break label617;
      str9 = "";
      label384: localTextView6.setText(str9);
      int j = this.mBlog.rtnum;
      if (j <= 0)
        break label659;
      this.tvRedirect.setVisibility(0);
      TextView localTextView7 = this.tvRedirect;
      String str10 = String.valueOf(j);
      localTextView7.setText(str10);
      this.imRedirect.setVisibility(0);
      label441: int k = this.mBlog.commentnum;
      if (k <= 0)
        break label680;
      this.tvComment.setVisibility(0);
      TextView localTextView8 = this.tvComment;
      String str11 = String.valueOf(k);
      localTextView8.setText(str11);
      this.imComment.setVisibility(0);
      label491: if (paramInt != 1)
        break label701;
      this.mIconV.setVisibility(8);
      this.mPortrait.setVisibility(8);
      this.mUploadPic1.setVisibility(8);
      this.mUploadPic2.setVisibility(8);
    }
    while (true)
    {
      return;
      this.mDate.setTextColor(-7829368);
      break;
      label547: this.mIconPic.setVisibility(8);
      break label174;
      label559: TextView localTextView9 = this.mContent;
      String str12 = this.mBlog.content;
      TextView.BufferType localBufferType3 = TextView.BufferType.SPANNABLE;
      localTextView9.setText(str12, localBufferType3);
      this.mSubContent.setText(null);
      this.mSubContent.setVisibility(8);
      this.mSubLayout.setVisibility(8);
      break label335;
      label617: Resources localResources = getResources();
      Object[] arrayOfObject2 = new Object[1];
      String str13 = this.mBlog.src;
      arrayOfObject2[0] = str13;
      str9 = localResources.getString(2131427556, arrayOfObject2);
      break label384;
      label659: this.tvRedirect.setVisibility(8);
      this.imRedirect.setVisibility(8);
      break label441;
      label680: this.tvComment.setVisibility(8);
      this.imComment.setVisibility(8);
      break label491;
      label701: if (paramInt != 0)
        continue;
      this.mUploadPic1.setVisibility(8);
      this.mUploadPic2.setVisibility(8);
      if (this.mBlog.portrait != null)
      {
        LoadPortraitTask localLoadPortraitTask = new LoadPortraitTask(null);
        Object[] arrayOfObject3 = new Object[4];
        String str14 = this.mBlog.portrait;
        arrayOfObject3[0] = str14;
        String str15 = this.mCacheDir;
        arrayOfObject3[1] = str15;
        ListView localListView = this.parent;
        arrayOfObject3[2] = localListView;
        MBlog localMBlog2 = this.mBlog;
        arrayOfObject3[3] = localMBlog2;
        AsyncTask localAsyncTask = localLoadPortraitTask.execute(arrayOfObject3);
      }
      Map localMap = Utils.portraitCacheMap;
      String str16 = this.mBlog.portrait;
      Bitmap localBitmap = (Bitmap)localMap.get(str16);
      if ((localBitmap == null) || (localBitmap.isRecycled()))
        continue;
      this.mPortrait.setVisibility(4);
      this.mPortrait.setImageBitmap(localBitmap);
      this.mPortrait.setVisibility(0);
    }
  }

  class LoadCRNumTask extends AsyncTask<String, Void, Object[]>
  {
    private LoadCRNumTask()
    {
    }

    protected Object[] doInBackground(String[] paramArrayOfString)
    {
      Object[] arrayOfObject1 = new Object[2];
      String str1 = paramArrayOfString[0];
      arrayOfObject1[0] = str1;
      try
      {
        if (MBlogListItemView.this.mBlog.rtrootid != null)
        {
          String str2 = MBlogListItemView.this.mBlog.rtrootid;
          if (!"".equals(str2));
        }
        else
        {
          RPCHelper localRPCHelper1 = RPCHelper.getInstance(MBlogListItemView.this.context);
          User localUser1 = StaticInfo.mUser;
          String[] arrayOfString1 = new String[1];
          String str3 = MBlogListItemView.this.mBlog.mblogid;
          arrayOfString1[0] = str3;
          int[] arrayOfInt1 = localRPCHelper1.getMblogCRNum(localUser1, arrayOfString1);
          arrayOfObject1[1] = arrayOfInt1;
        }
        while (true)
        {
          arrayOfObject2 = arrayOfObject1;
          return arrayOfObject2;
          RPCHelper localRPCHelper2 = RPCHelper.getInstance(MBlogListItemView.this.context);
          User localUser2 = StaticInfo.mUser;
          String[] arrayOfString2 = new String[2];
          String str4 = MBlogListItemView.this.mBlog.mblogid;
          arrayOfString2[0] = str4;
          String str5 = MBlogListItemView.this.mBlog.rtrootid;
          arrayOfString2[1] = str5;
          int[] arrayOfInt2 = localRPCHelper2.getMblogCRNum(localUser2, arrayOfString2);
          arrayOfObject1[1] = arrayOfInt2;
        }
      }
      catch (RPCHelper.HttpException localHttpException)
      {
        while (true)
        {
          localHttpException.printStackTrace();
          Object[] arrayOfObject2 = null;
        }
      }
    }

    // ERROR //
    protected void onPostExecute(Object[] paramArrayOfObject)
    {
      // Byte code:
      //   0: aload_0
      //   1: aload_1
      //   2: invokespecial 82	android/os/AsyncTask:onPostExecute	(Ljava/lang/Object;)V
      //   5: getstatic 88	com/sina/weibo/Utils:lock	Ljava/lang/Object;
      //   8: astore_2
      //   9: aload_2
      //   10: monitorenter
      //   11: aload_1
      //   12: ifnonnull +6 -> 18
      //   15: aload_2
      //   16: monitorexit
      //   17: return
      //   18: aload_1
      //   19: iconst_0
      //   20: aaload
      //   21: checkcast 43	java/lang/String
      //   24: astore_3
      //   25: invokestatic 92	com/sina/weibo/view/MBlogListItemView:access$10	()Ljava/util/Map;
      //   28: aload_3
      //   29: invokeinterface 98 2 0
      //   34: checkcast 100	android/widget/ListView
      //   37: astore 4
      //   39: aload 4
      //   41: invokevirtual 104	android/widget/ListView:getChildCount	()I
      //   44: istore 5
      //   46: aload_1
      //   47: iconst_1
      //   48: aaload
      //   49: checkcast 106	[I
      //   52: astore 6
      //   54: iconst_0
      //   55: istore 7
      //   57: iload 7
      //   59: iload 5
      //   61: if_icmplt +26 -> 87
      //   64: invokestatic 92	com/sina/weibo/view/MBlogListItemView:access$10	()Ljava/util/Map;
      //   67: aload_3
      //   68: invokeinterface 109 2 0
      //   73: astore 8
      //   75: aload_2
      //   76: monitorexit
      //   77: goto -60 -> 17
      //   80: astore 9
      //   82: aload_2
      //   83: monitorexit
      //   84: aload 9
      //   86: athrow
      //   87: aload 4
      //   89: iload 7
      //   91: invokevirtual 113	android/widget/ListView:getChildAt	(I)Landroid/view/View;
      //   94: instanceof 7
      //   97: ifne +12 -> 109
      //   100: iload 7
      //   102: iconst_1
      //   103: iadd
      //   104: istore 7
      //   106: goto -49 -> 57
      //   109: aload 4
      //   111: iload 7
      //   113: invokevirtual 113	android/widget/ListView:getChildAt	(I)Landroid/view/View;
      //   116: checkcast 7	com/sina/weibo/view/MBlogListItemView
      //   119: astore 10
      //   121: aload 10
      //   123: getfield 33	com/sina/weibo/view/MBlogListItemView:mBlog	Lcom/sina/weibo/models/MBlog;
      //   126: getfield 66	com/sina/weibo/models/MBlog:mblogid	Ljava/lang/String;
      //   129: aload_3
      //   130: invokevirtual 47	java/lang/String:equals	(Ljava/lang/Object;)Z
      //   133: ifeq -33 -> 100
      //   136: aload 6
      //   138: ifnonnull +8 -> 146
      //   141: aload_2
      //   142: monitorexit
      //   143: goto -126 -> 17
      //   146: aload 6
      //   148: iconst_0
      //   149: iaload
      //   150: ifle +79 -> 229
      //   153: aload 6
      //   155: iconst_0
      //   156: iaload
      //   157: ifge +158 -> 315
      //   160: aload_0
      //   161: getfield 15	com/sina/weibo/view/MBlogListItemView$LoadCRNumTask:this$0	Lcom/sina/weibo/view/MBlogListItemView;
      //   164: getfield 33	com/sina/weibo/view/MBlogListItemView:mBlog	Lcom/sina/weibo/models/MBlog;
      //   167: getfield 117	com/sina/weibo/models/MBlog:rtnum	I
      //   170: istore 11
      //   172: iload 11
      //   174: invokestatic 121	java/lang/String:valueOf	(I)Ljava/lang/String;
      //   177: astore 12
      //   179: aload 10
      //   181: invokestatic 125	com/sina/weibo/view/MBlogListItemView:access$8	(Lcom/sina/weibo/view/MBlogListItemView;)Landroid/widget/TextView;
      //   184: astore 13
      //   186: aload_0
      //   187: getfield 15	com/sina/weibo/view/MBlogListItemView$LoadCRNumTask:this$0	Lcom/sina/weibo/view/MBlogListItemView;
      //   190: invokevirtual 129	com/sina/weibo/view/MBlogListItemView:getResources	()Landroid/content/res/Resources;
      //   193: ldc 130
      //   195: invokevirtual 135	android/content/res/Resources:getString	(I)Ljava/lang/String;
      //   198: invokestatic 138	java/lang/String:valueOf	(Ljava/lang/Object;)Ljava/lang/String;
      //   201: astore 14
      //   203: new 140	java/lang/StringBuilder
      //   206: dup
      //   207: aload 14
      //   209: invokespecial 143	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
      //   212: aload 12
      //   214: invokevirtual 147	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
      //   217: invokevirtual 151	java/lang/StringBuilder:toString	()Ljava/lang/String;
      //   220: astore 15
      //   222: aload 13
      //   224: aload 15
      //   226: invokevirtual 157	android/widget/TextView:setText	(Ljava/lang/CharSequence;)V
      //   229: aload 6
      //   231: iconst_1
      //   232: iaload
      //   233: ifle -133 -> 100
      //   236: aload 6
      //   238: iconst_1
      //   239: iaload
      //   240: ifge +104 -> 344
      //   243: aload_0
      //   244: getfield 15	com/sina/weibo/view/MBlogListItemView$LoadCRNumTask:this$0	Lcom/sina/weibo/view/MBlogListItemView;
      //   247: getfield 33	com/sina/weibo/view/MBlogListItemView:mBlog	Lcom/sina/weibo/models/MBlog;
      //   250: getfield 160	com/sina/weibo/models/MBlog:commentnum	I
      //   253: istore 11
      //   255: iload 11
      //   257: invokestatic 121	java/lang/String:valueOf	(I)Ljava/lang/String;
      //   260: astore 16
      //   262: aload 10
      //   264: invokestatic 163	com/sina/weibo/view/MBlogListItemView:access$9	(Lcom/sina/weibo/view/MBlogListItemView;)Landroid/widget/TextView;
      //   267: astore 17
      //   269: aload_0
      //   270: getfield 15	com/sina/weibo/view/MBlogListItemView$LoadCRNumTask:this$0	Lcom/sina/weibo/view/MBlogListItemView;
      //   273: invokevirtual 129	com/sina/weibo/view/MBlogListItemView:getResources	()Landroid/content/res/Resources;
      //   276: ldc 164
      //   278: invokevirtual 135	android/content/res/Resources:getString	(I)Ljava/lang/String;
      //   281: invokestatic 138	java/lang/String:valueOf	(Ljava/lang/Object;)Ljava/lang/String;
      //   284: astore 18
      //   286: new 140	java/lang/StringBuilder
      //   289: dup
      //   290: aload 18
      //   292: invokespecial 143	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
      //   295: aload 16
      //   297: invokevirtual 147	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
      //   300: invokevirtual 151	java/lang/StringBuilder:toString	()Ljava/lang/String;
      //   303: astore 19
      //   305: aload 17
      //   307: aload 19
      //   309: invokevirtual 157	android/widget/TextView:setText	(Ljava/lang/CharSequence;)V
      //   312: goto -212 -> 100
      //   315: aload_0
      //   316: getfield 15	com/sina/weibo/view/MBlogListItemView$LoadCRNumTask:this$0	Lcom/sina/weibo/view/MBlogListItemView;
      //   319: getfield 33	com/sina/weibo/view/MBlogListItemView:mBlog	Lcom/sina/weibo/models/MBlog;
      //   322: astore 20
      //   324: aload 6
      //   326: iconst_0
      //   327: iaload
      //   328: istore 21
      //   330: aload 20
      //   332: iload 21
      //   334: putfield 117	com/sina/weibo/models/MBlog:rtnum	I
      //   337: iload 21
      //   339: istore 11
      //   341: goto -169 -> 172
      //   344: aload_0
      //   345: getfield 15	com/sina/weibo/view/MBlogListItemView$LoadCRNumTask:this$0	Lcom/sina/weibo/view/MBlogListItemView;
      //   348: getfield 33	com/sina/weibo/view/MBlogListItemView:mBlog	Lcom/sina/weibo/models/MBlog;
      //   351: astore 22
      //   353: aload 6
      //   355: iconst_1
      //   356: iaload
      //   357: istore 23
      //   359: aload 22
      //   361: iload 23
      //   363: putfield 160	com/sina/weibo/models/MBlog:commentnum	I
      //   366: iload 23
      //   368: istore 11
      //   370: goto -115 -> 255
      //
      // Exception table:
      //   from	to	target	type
      //   15	80	80	finally
      //   87	366	80	finally
    }

    protected void onPreExecute()
    {
      super.onPreExecute();
      if (MBlogListItemView.this.mBlog.rtnum > 0)
      {
        TextView localTextView1 = MBlogListItemView.this.tvRedirect;
        String str1 = String.valueOf(MBlogListItemView.this.getResources().getString(2131427432));
        StringBuilder localStringBuilder1 = new StringBuilder(str1);
        int i = MBlogListItemView.this.mBlog.rtnum;
        String str2 = i;
        localTextView1.setText(str2);
      }
      if (MBlogListItemView.this.mBlog.commentnum > 0)
      {
        TextView localTextView2 = MBlogListItemView.this.tvComment;
        String str3 = String.valueOf(MBlogListItemView.this.getResources().getString(2131427433));
        StringBuilder localStringBuilder2 = new StringBuilder(str3);
        int j = MBlogListItemView.this.mBlog.commentnum;
        String str4 = j;
        localTextView2.setText(str4);
      }
    }
  }

  class LoadPictureTask extends AsyncTask<Object, Void, Object[]>
  {
    private LoadPictureTask()
    {
    }

    protected Object[] doInBackground(Object[] paramArrayOfObject)
    {
      String str1 = (String)paramArrayOfObject[0];
      if (str1 != null)
        str1 = str1.replace("/wap240/", "/wap120/");
      ImageView localImageView1 = (ImageView)paramArrayOfObject[1];
      ImageView localImageView2 = (ImageView)paramArrayOfObject[2];
      String str2 = MBlogListItemView.this.mFileDir;
      ListView localListView = MBlogListItemView.this.parent;
      MBlog localMBlog = MBlogListItemView.this.mBlog;
      Bitmap localBitmap = Utils.getPreviewBitmap(str1, str2, localListView, localMBlog, 0);
      Object[] arrayOfObject = new Object[3];
      arrayOfObject[0] = localBitmap;
      arrayOfObject[1] = localImageView1;
      arrayOfObject[2] = localImageView2;
      return arrayOfObject;
    }

    protected void onPostExecute(Object[] paramArrayOfObject)
    {
      MBlogListItemView.this.loadPictureRunning = 0;
      if ((paramArrayOfObject != null) && (paramArrayOfObject[0] != 0))
      {
        ImageView localImageView1 = (ImageView)paramArrayOfObject[1];
        MBlogListItemView localMBlogListItemView1 = MBlogListItemView.this;
        Bitmap localBitmap1 = (Bitmap)paramArrayOfObject[0];
        Bitmap localBitmap2 = localMBlogListItemView1.getPreviewPic(localBitmap1);
        localImageView1.setImageBitmap(localBitmap2);
        ((ImageView)paramArrayOfObject[1]).setBackgroundResource(2130837607);
        ImageView localImageView2 = (ImageView)paramArrayOfObject[2];
        MBlogListItemView localMBlogListItemView2 = MBlogListItemView.this;
        Bitmap localBitmap3 = (Bitmap)paramArrayOfObject[0];
        Bitmap localBitmap4 = localMBlogListItemView2.getPreviewPic(localBitmap3);
        localImageView2.setImageBitmap(localBitmap4);
        ((ImageView)paramArrayOfObject[2]).setBackgroundResource(2130837607);
        MBlogListItemView.this.finishPicLoad = 1;
      }
    }

    protected void onPreExecute()
    {
      super.onPreExecute();
      MBlogListItemView.this.loadPictureRunning = 1;
      MBlogListItemView.this.finishPicLoad = 0;
      ImageView localImageView1 = MBlogListItemView.this.mUploadPic1;
      Drawable localDrawable1 = MBlogListItemView.this.context.getResources().getDrawable(2130837967);
      localImageView1.setImageDrawable(localDrawable1);
      MBlogListItemView.this.mUploadPic1.setBackgroundDrawable(null);
      ImageView localImageView2 = MBlogListItemView.this.mUploadPic2;
      Drawable localDrawable2 = MBlogListItemView.this.context.getResources().getDrawable(2130837967);
      localImageView2.setImageDrawable(localDrawable2);
      MBlogListItemView.this.mUploadPic2.setBackgroundDrawable(null);
    }
  }

  class LoadPortraitTask extends AsyncTask<Object, Void, Object[]>
  {
    private LoadPortraitTask()
    {
    }

    protected Object[] doInBackground(Object[] paramArrayOfObject)
    {
      String str1 = (String)paramArrayOfObject[0];
      String str2 = (String)paramArrayOfObject[1];
      ListView localListView = (ListView)paramArrayOfObject[2];
      MBlog localMBlog = (MBlog)paramArrayOfObject[3];
      Object[] arrayOfObject = new Object[2];
      String str3 = localMBlog.portrait;
      arrayOfObject[0] = str3;
      Bitmap localBitmap = Utils.getPortraitBitmap(str1, str2, localListView, localMBlog, 1);
      arrayOfObject[1] = localBitmap;
      return arrayOfObject;
    }

    protected void onPostExecute(Object[] paramArrayOfObject)
    {
      String str = (String)paramArrayOfObject[0];
      Bitmap localBitmap1 = (Bitmap)paramArrayOfObject[1];
      if (!MBlogListItemView.this.mBlog.portrait.equals(str));
      while (true)
      {
        return;
        if ((localBitmap1 != null) && (!localBitmap1.isRecycled()))
        {
          MBlogListItemView.this.mPortrait.setVisibility(4);
          MBlogListItemView.this.mPortrait.setImageBitmap(localBitmap1);
          MBlogListItemView.this.mPortrait.setVisibility(0);
          continue;
        }
        MBlogListItemView.this.mPortrait.setVisibility(4);
        ImageView localImageView = MBlogListItemView.this.mPortrait;
        Bitmap localBitmap2 = MBlogListItemView.this.getDefaultPortrait();
        localImageView.setImageBitmap(localBitmap2);
        MBlogListItemView.this.mPortrait.setVisibility(0);
      }
    }

    protected void onPreExecute()
    {
    }

    protected void onProgressUpdate(Void[] paramArrayOfVoid)
    {
    }
  }

  class MyThread extends Thread
  {
    Spannable sp;

    public MyThread(Spannable arg2)
    {
      Object localObject;
      this.sp = localObject;
    }

    public void run()
    {
      Context localContext = MBlogListItemView.this.getContext();
      Spannable localSpannable = this.sp;
      Utils.highlightContent(localContext, localSpannable);
    }
  }
}

/* Location:           D:\Program Files\eclipse\apktool-r01-3\新浪微博\classes.dex.dex2jar.jar
 * Qualified Name:     com.sina.weibo.view.MBlogListItemView
 * JD-Core Version:    0.6.0
 */